<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/common.jsp"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
  <head>
   <title>权限表</title>
   <%@ include file="/common/meta.jsp"%>   
   <link href="<c:url value='/styles/main.css'/>" type="text/css" rel="stylesheet">   
<link href="<c:url value='/widgets/ext/css/ext-all.css'/>" type="text/css" rel="stylesheet">
<script src="<c:url value='/widgets/ext/scripts/ext-base.js'/>" type="text/javascript"></script>
<script src="<c:url value='/widgets/ext/scripts/ext-all.js'/>" type="text/javascript"></script>
<script src="<c:url value='/widgets/ext/scripts/miframe.js'/>" type="text/javascript"></script>
<link href="<c:url value="/widgets/extremecomponents/extremecomponents.css"/>" type="text/css"  rel="stylesheet"/>
<script type="text/javascript" src='<%=contextPath%>/dwr/interface/permissionService.js'></script>
<script type="text/javascript" src='<%=contextPath%>/dwr/engine.js'></script>
<script type="text/javascript" src='<%=contextPath%>/dwr/util.js'></script>
</head>
<script type="text/javascript">
  function addPermission(){  
  	openPop("permission.do?method=add","新增权限",480,320);  	
  }
  function editInfo(id){
  	openPop("permission.do?method=edit&id="+id,"编辑权限",480,320);
  }
  function deleteInfo(id){
  	if(window.confirm("确定要删除记录吗？"))
  	{  		
  		permissionService.deleteById(id,function(reply){ajaxSubmit(reply,"删除成功!","reload");});
  	}else{
  		return false;
  	}
  }
</script>
 <body bgcolor="#F2FEF4">
		<div id="detailheader">
			<img src="<%=request.getContextPath()%>/images/main/main_ban01Dot.png" />
			<div>权限表</div>
		</div>
		<html:form action="permission.do?method=search" method="get">
			<div id="timecote">	
				<div id="timel"></div>			
				<div id="timem">
					<table cellspacing="5px">
						<tr>
													
						</tr>
					</table>
				</div>
				<div id="timer"></div>
			</div>
			<div style="text-align:right;padding:5px">
				<input type="button" class="btn_Xp_Bg0" value="新增" onclick="addPermission()"/>
			</div>
			<div id="tbcontent">
				<ec:table items="resultList" var="rs" form="permissionForm"
					action="${pageContext.request.contextPath}/permission.do?method=search"
					title="权限表" retrieveRowsCallback="limit"
					sortRowsCallback="limit" width="95%">
					<ec:row>
						<ec:column property="0" title="权限编号">
							<c:out value="${rs.permissionCode}" />
						</ec:column>
						<ec:column property="1" title="权限名称">
							<c:out value="${rs.permissionName}" />
						</ec:column>
						<ec:column property="2" title="备注">
							<c:out value="${rs.remark}" />
						</ec:column>
						<ec:column property="3" title=" ">
							<a href="#" onclick="editInfo(<c:out value='${rs.serialNo}'/>);return false">编辑</a>
						</ec:column>
						<ec:column property="4" title=" ">
							<a href="#" onclick="deleteInfo(<c:out value='${rs.serialNo}'/>);return false">删除</a>
						</ec:column>
					</ec:row>
				</ec:table>
			</div>
		</html:form>		
	</body>
</html>
